{% extends 'user_center_base.html' %}

{% load staticfiles %}

{% block title %}天天生鲜-用户中心{% endblock %}

{% block body %}
    <div class="main_con clearfix">
        <div class="left_menu_con clearfix">
            <h3>用户中心</h3>
            <ul>
				<li><a href="{% url 'users:info' %}">· 个人信息</a></li>
				<li><a href="{% url 'orders:info' 1 %}" class="active">· 全部订单</a></li>
				<li><a href="{% url 'users:address' %}">· 收货地址</a></li>
			</ul>
        </div>
        <div class="right_content clearfix">
            <h3 class="common_title2">订单评价</h3>
                <ul class="order_list_th w978 clearfix">
					<li class="col01">{{order.create_time}}</li>
					<li class="col02">订单号：{{order.order_id}}</li>
					<li class="col02 stress">{{order.status_name}}</li>
				</ul>
            <form method="post">
                {% csrf_token %}
                <input type="hidden" name="order_id" value="{{order.order_id}}">
                <input type="hidden" name="total_count" value="{{order.skus|length}}">
                {% for sku in order.skus %}
                <table class="order_list_table w980">
                    <tbody>
                        <tr>
                            <td width="80%">
                                <ul class="order_goods_list clearfix">
                                    <li class="col01"><img src="{{ sku.default_image.url }}"></li>
                                    <li class="col02">{{sku.name}}<em>{{sku.price}}/{{sku.unit}}</em></li>
                                    <li class="col03">{{sku.count}}</li>
                                </ul>
                            </td>
                            <td width="20%">{{sku.amount}}元</td>
                        </tr>
                    </tbody>
                </table>
                <div class="site_con">
                    <input type="hidden" name="sku_{{forloop.counter}}" value="{{sku.id}}">
                    <div class="form_group form_group2">
                        <label>评价内容：</label>
                        <textarea class="site_area" name="content_{{forloop.counter}}"></textarea>
                    </div>
                </div>
                {% endfor %}
                <input type="submit" name="" value="提交" class="info_submit">
            </form>
        </div>
    </div>
{% endblock %}
